import { ref, computed, reactive } from "vue";
import { defineStore } from "pinia";

export const useCounterStore = defineStore(
  "counter",
  () => {
    const userinfo = reactive({
      //记录本次登录返回值中的数据
      RefreshToken: "", //存储长期Token的键
      RealName: "", //用户真实姓名
      AccountToken: "", //存储短期Token
    });
    const AccountInfo = reactive({
      //记录本次登录使用的,用于记住密码
      UserName: "", //账号
      UserPwd: "", //密码
    });
    return { userinfo, AccountInfo };
  },
  {
    persist: true, //开启pinia持久化
  }
);
